package com.itheima.d5_resource;

/*
     目标：认识try-catch-finally。
 */
public class Test1 {
    public static void main(String[] args) {
        try {
            System.out.println("try开始运行");
            int[] arr = {1, 2, 3, 4, 5};
            System.out.println(arr[3]);
        System.exit(0);
            System.out.println("try结束");
        }catch (Exception e){
            System.out.println("匹配异常");
        }finally {
            System.out.println("finally 触发");
        }
        System.out.println("程序最后执行");
    }

}
